import { createApp } from 'vue'
import App from './App.vue'
import router from './router'
import ElementPlus from 'element-plus'
import 'element-plus/dist/index.css'
import "uno.css";
import "aos/dist/aos.css";
import NProgress from 'nprogress';
import 'nprogress/nprogress.css';
import "@/assets/style/reset.scss";
import "@/assets/base.css";
import log from './util/log.ts'
import store from './store';
import * as ElementPlusIconsVue from '@element-plus/icons-vue'

const app = createApp(App)

router.beforeEach((to, from, next) => {
  NProgress.start(); // 开始进度条
  next(); // 继续路由导航
});

router.afterEach(() => {
  NProgress.done(); // 完成进度条
});

for (const [key, component] of Object.entries(ElementPlusIconsVue)) {
  app.component(key, component);
}

app.use(log)

app.use(router)

app.use(store)

app.use(ElementPlus)
app.use(ElementPlus)

app.mount('#app')
